<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ page import="java.sql.*" %>
 <%@page import="com.Datetools"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>保存提交的数据</title>
</head>
<body>
<%
//接收用户填写的数据
request.setCharacterEncoding("utf-8");
String TeaId=(String)request.getSession().getAttribute("UserNum");
String Date = request.getParameter("Date");
String Region = request.getParameter("location")+request.getParameter("place");
String IsChengDu = request.getParameter("chendu");
String CodeStatus = request.getParameter("code");
String IsHealth = request.getParameter("body");
String IsIsolate = request.getParameter("guankong");
String IsContact = request.getParameter("mijie");
String IsNuclein = request.getParameter("hesuan");
String IsSure = request.getParameter("promise");


//构造写入数据库的SQL
String sql = "insert into teachercheck(TeaId,Date,Region,IsChengDu,CodeStatus,IsHealth,IsIsolate,IsContact,IsNuclein,IsSure) values('"+TeaId+"','"+Date+"','"+Region+"','"+IsChengDu+"','"+CodeStatus+"','"+IsHealth+"','"+IsIsolate+"','"+IsContact+"','"+IsNuclein+"','"+IsSure+"')";
out.println("sql=" + sql);

//连接数据库


//执行SQL写入数据
int r = com.DBtools.execute(sql);
out.println("影响行数：" + r);





//返回页面
response.sendRedirect("clocklist.jsp");


%>

</body>
</html>